from tqdm.auto import tqdm, trange
from time import sleep

bar = trange(10)
a=[]
for i in bar:
    # Print using tqdm class method .write()
    sleep(0.1)
    if not (i % 3):
        a.append(tqdm.write("Done task %i" % i))
    # Can also use bar.write()

print("a:\n",a)